import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue"
Vue.use(VueRouter);
const routes = [{
    path: "/",
    name: "Home",
    component: Home,
},
{
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
        import( /* webpackChunkName: "about" */ "../views/About.vue"),
},
{
    path: '/menu',
    name: 'menu',
    component: () =>
        import('@/views/Menu.vue')
},
{
    path: '/login',
    name: 'login',
    component: () =>
        import('@/components/Login.vue')
},
{
    path:'/detail/:pid',
    name:'detail',
    props:true,
    component:()=> import('@/components/Detail.vue')
},
{
    path: "/find",
    name: "Find",
    component: () =>
        import("../views/find.vue"),
},
{
    path: "/Menuitem",
    name: "Menuitem",
    component: () =>
        import("../components/Menuitem.vue"),
},
{
    path: "/production",
    name: "production",
    component: () => import("../views/Production.vue")
}
]

const router = new VueRouter({
    routes,
});

export default router;